import React, { useEffect } from 'react';
import axios from 'axios';


export default function Index() {
  const handleUpload = (e: any) => {
    const file = e.target.files[0];
    const formData = new FormData();
    formData.append('file', file);
    axios({
      method: 'post',
      url: 'http://localhost:3000/upload',
      data: formData,
    }).then((response) => {
      console.log(response);
    }).catch((error) => {
      console.log(error);
    })

  }
  return (<>
    <div>asd</div>
    <div>asd</div>
    <div>asd</div>
    <div>asd</div>
    <div>asd</div>
    <div>asd</div>
    <input type='file' onChange={handleUpload} />
  </>)
}